from common.base_page import BasePage
from locator.login_locator import login_Locator as LL


class login_Page(BasePage):

    # 登录
    def login(self, user, pwd):
        self.input_text(LL.loc_user, user, "输入用户")
        self.input_text(LL.loc_pwd, pwd, "输入密码")
        self.get_click(LL.loc_button, "点击按钮")

    # 登录页面的消息提示
    def get_error_info(self):
        """获取错误提示"""
        # return self.driver.find_element(*self.error_info).text
        return self.get_element_text(LL.loc_login_user_fail, '登录页面_登录的错误提示')
